package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 交货地址实体类
 *
 * @author 吴旭
 */
public class DeliveryAddressEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 1054377776254354506L;
    private Long AddressId;
    private String AddressNo;
    private String DeliveryAddress;

    public Long getAddressId() {
        return AddressId;
    }

    public String getAddressNo() {
        return AddressNo;
    }

    public String getDeliveryAddress() {
        return DeliveryAddress;
    }

    public void setAddressId(Long AddressId) {
        this.AddressId = AddressId;
    }

    public void setAddressNo(String AddressNo) {
        this.AddressNo = AddressNo;
    }

    public void setDeliveryAddress(String DeliveryAddress) {
        this.DeliveryAddress = DeliveryAddress;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof DeliveryAddressEntity)) {
            return false;
        }

        final DeliveryAddressEntity that = (DeliveryAddressEntity) o;

        return new EqualsBuilder()
            .append(this.getAddressId(), that.getAddressId())
            .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getAddressId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
